﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<Cs2102BookingSystem.Models.BOOKING>>" %>
<h3  style="text-align:left; padding-left:5%;">New Booking Records</h3>
    <table class="listing">
        <tr>
            <th>
                Confirmation ID
            </th>
            <th>
                Visiting Country
            </th>
            <th>
                Hotel Name
            </th>
            <th>
                Room & Bed type
            </th>
            <th>
                Arrival Date/<br />
                Departure Date
            </th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%: Html.ActionLink(item.BOOKINGID.ToString(), "BookingDetail", new { id = item.BOOKINGID })%>
            </td>
            <td>
                <%: item.H_COUNTRY %>
            </td>
            <td>
                <%: item.H_NAME %>
            </td>
            <td>
                <%: item.R_ROOMTYPE %> with<br /> <%: item.R_BEDTYPE %>
            </td>
            <td>
                <%: String.Format("{0:g}", item.STARTDATE) %><br /><%: String.Format("{0:g}", item.ENDDATE) %>
            </td>
        </tr>
    
    <% } %>

    </table>

    <p style="text-align:right; padding-right:20%;">
        <%: Html.ActionLink("See More", "AllEditableBooking")%>
    </p>


